package com.kcl.dfss.view;

/*
 * ͳ��ҳ���ʻ״̬�Զ���ؼ�
 */
import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.kcl.dfss.R;

public class CarStateView extends LinearLayout {
	
	private ImageView imageView;
    private TextView  textView;

	public CarStateView(Context context) {
		super(context);
	}

	public CarStateView(Context context, AttributeSet attrs) {
		super(context, attrs);
		LayoutInflater inflater=(LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        inflater.inflate(R.layout.view_carstate, this);
        imageView=(ImageView) findViewById(R.id.image_car_state);
        textView=(TextView)findViewById(R.id.text_car_state);
	}

	
    public void setImageResource(int resId) { 
        imageView.setImageResource(resId); 
    } 
   
    
    public void setTextViewText(String text) { 
        textView.setText(text); 
    }
	
	public void setBackground(int resID,int text){
		imageView.setImageResource(resID);
		textView.setText(text); 
	}

}
